package com.jt.controller;

import com.jt.service.ItemCatParamService;
import com.jt.vo.EasyUITable;
import com.jt.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dc
 * @Classname ItemParamController
 * @Date 2020/2/23 9:48
 */
@RestController
@RequestMapping("/item/param")
public class ItemCatParamController {

    @Autowired
    private ItemCatParamService itemCatParamService;

    @RequestMapping("/list")
    public EasyUITable findItemParamList(Integer page,Integer rows){
        return itemCatParamService.findItemCatParam(page,rows);
    }

    @RequestMapping("/query/itemCatId/{cid}")
    public SysResult findItemCatParam(@PathVariable Long cid){
        return itemCatParamService.getItemCatParamByCid(cid);
    }

    @RequestMapping("save/{cid}")
    public SysResult saveItemCatParam(String paramData,@PathVariable Long cid){
        itemCatParamService.saveItemCatParam(paramData,cid);
        return SysResult.success();
    }
   
}
